import request from '@/utils/request'

/**
 * 获取我的频道
 */
export const reqGetChannels = () => request({
  method: 'get',
  url: '/v1_0/user/channels'
})

/**
 * 获取所有频道
 */
export const reqGetAllChannels = () => {
  return request({
    method: 'get',
    url: '/v1_0/channels'
  })
}

/**
 * 重置我的频道数据
 * @param {*} channels [{id:频道id，seq:顺序序号}]
 */
export const reqSetChannels = (channels) => {
  return request({
    method: 'put',
    url: '/v1_0/user/channels',
    data: {
      channels
    }
  })
}
